package com.linlw.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.ui.Model;
//import org.springframework.web.bind.annotation.RestController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

//@RestController
@Controller
public class HelloController {

    @GetMapping("/")
    public String helloworld(Model model) {
        model.addAttribute("message", "Hello, World!");
        return "hello";
    }

    @GetMapping("/hello")
    @ResponseBody
    public String hello(){
        return "Hello Message";
    }
}
